<?php
/**
* $Id: index.php 156 2010-05-06 08:10:08Z bwanglei $
*/

include_once(BASE_PATH.TEMP_DIR.'/header.php');
include_once(BASE_PATH.TEMP_DIR.'/header_b.php');
?>

<div id="content_b">
	<?php
	// 判断分区个数 并利用 for 循环遍历所有分区
	$count_qu = count($array_banmian);
	for ($i=0; $i<$count_qu; $i++) {
	?>
	<!-- 显示不同的分区 -->
	<div class="qu_content">
		<!-- 分区名称 -->
		<div class="title_qu_content font_bold"><?php echo $array_banmian[$i]['name'];?>
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(
		<?php echo $array_banmian[$i]['miaoshu'];?>)</div>
		<?php
		// 判断分区是否有版面
		if (isset($array_banmian[$i]['banmian_2'])) {
			$count_banmian_2 = count($array_banmian[$i]['banmian_2']);
		} else {
			$count_banmian_2 = 0;
		}

		// 遍历分区下所有的版面
		for ($j=0; $j<$count_banmian_2; $j++) {
		?>
		<!-- 分区下的版面信息 -->
		<div class="banmian_2_content">
			<!-- 版面列名描述 -->
			<div class="title_banmian_2 font_bold">版面名称</div>
			<div class="miaoshu_banmian_2 font_bold">版面描述信息</div>
			<div class="rec_thread_banmian_2 font_bold">最近发表的文章</div>
			<div class="banzhu_banmian_2 font_bold">本版版主</div>
			<!-- 版面各列的值 -->
			<div class="title_banmian_2 font_bold">
			<a href="<?php echo $apf_settings['base_url'];?>/banmian.php?id=<?php echo $array_banmian[$i]['banmian_2'][$j]['id'];?>"><?php echo $array_banmian[$i]['banmian_2'][$j]['name'];?></a></div>
			<div class="miaoshu_banmian_2">
			<a href="<?php echo $apf_settings['base_url'];?>/banmian.php?id=<?php echo $array_banmian[$i]['banmian_2'][$j]['id'];?>"><?php echo $array_banmian[$i]['banmian_2'][$j]['miaoshu'];?></a></div>
			<!-- 版面的最新文章信息，包括最新文章的标题，时间和作者 -->
			<div class="rec_thread_banmian_2">
				<?php if (isset($array_banmian[$i]['banmian_2'][$j]['rec_thread'])) {?>
				<a href="<?php echo $apf_settings['base_url'];?>/thread.php?t_id=<?php echo $array_banmian[$i]['banmian_2'][$j]['rec_thread']['id'];?>"><span class="font_bold"><?php echo $array_banmian[$i]['banmian_2'][$j]['rec_thread']['title'];?></span></a>
				<?php } ?>
			</div>
			<div class="banzhu_banmian_2 font_bold"><?php
			if (isset($array_banmian[$i]['banmian_2'][$j]['banzhu'])) {
				foreach ($array_banmian[$i]['banmian_2'][$j]['banzhu'] as $each_banzhu) {
					echo $each_banzhu;
				}
			} else {
				echo 'root';
			}?></div>
		</div>
		<?php
		}
		?>
	</div>
	<?php
	}
	?>
</div>
<?php include_once('footer.php'); ?>
